<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        *{padding: 0;margin:0;}
        body{
            height: 2000px;}
    </style>
    <script src="../js/jquery-1.10.2.min.js "></script>
    <script src="../js/angular1.6.3.min.js"></script>
    <script>

    </script>

</head>
<body>
<div id="div" ng-app="myApp" ng-controller="names">

    <div id="ng" ng-click="name=name+1">{{name}}</div>
    <p ng-click="fn()" style="background-color: red;">lk;sdf;kljasdf</p>
</div>
</body>
</html>
<script>
 var app=angular.module("myApp",[]);
    app.controller("names", function ($scope) {
        $scope.name= 0;
        $scope.fn= function () {
            alert(1)
        }
    })
</script>
